package qnb.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import qnb.dao.RoomDao;
import qnb.entity.Room;
import qnb.service.RoomService;
@Service
public class RoomServiceImpl implements RoomService {
	@Autowired
	private RoomDao dao;
	@Override
	public int addRoom(Room room) {
		return dao.addRoom(room);
	}

	@Override
	public int updateRoom(Room room) {
		return dao.updateRoom(room);
		
	}

	@Override
	public int deleteRoom(int[] id) {
		if(true) {
			
		}
		return dao.deleteRoom(id);
	}

	@Override
	public int sumCount() {
		return dao.sumCount();
	}

	@Override
	public Room selectToId(int id) {
		
		return dao.selectToId(id);
	}

	@Override
	public List<Room> selectAll(int page, int rows) {
		return dao.selectAll( page, rows);
	}

	@Override
	public List<Room> selectAll() {
		return dao.selectAll1();
	}

	@Override
	public List<Room> checkDel(int[] id) {
		// TODO Auto-generated method stub
		return dao.checkDel(id);
	}

	@Override
	public Room check_Name(String roomName) {
		
		return dao.check_Name(roomName);
	}
	
	
}
